1. Field of the Invention
The invention relates to debugger impact reduction through breakpoint motion.
2. Background Information
A debugger is a software tool used by programmers in software development to identify and correct program errors within a program. To support the debugger, information describing symbols and types in the program as well as information to map between source lines and the binary code may be provided by a compiler and/or an interpreter (“compiler”). This extra information, generally referred to as debugging information, enables the programmer to examine the types, variables and data structures by name and to follow the execution of the program through the source code.
With a debugger, programmers may “step” through program code statements one at a time, while the corresponding machine instructions are being executed. As programmers step through code, they may, inter alia, concurrently monitor changes in certain variables, which assists in identifying and correcting program errors.
With a debugger, a programmer may also set a breakpoint at a specific program position. When the program is executed, the debugger will stop execution of the program at any breakpoint encountered, and may display various programming elements, such as software variables for example, to assist in the debugging process.
Debuggers may also allow programmers to define and set conditional breakpoints. A conditional breakpoint is a breakpoint that has an associated Boolean expression. Upon encountering a conditional breakpoint, a debugger will only stop execution of the program if the associated Boolean expression is evaluated by the debugger to be TRUE (i.e., satisfied). For example, a conditional breakpoint may be BREAK 6 IF K<999. Accordingly, a debugger would only stop execution of the program at the location of such a conditional breakpoint (here, line 6) if the variable K is less than the value 999 when the conditional breakpoint is encountered.
In today's software development environment, many new software applications are threaded. As such, they are designed to efficiently execute in multitasking or multiprocessing environments, which allow multiple threads, or streams of execution, to execute concurrently. With the increased frequency of threaded applications, programming timing errors are becoming more common than ever.
A significant problem with debugging program timing errors is that the introduction of breakpoints may dramatically affect program timing, which may make difficult or impossible the reproduction of program errors in the debugging environment. While conditional breakpoints may affect overall program timing less than normal breakpoints and program code stepping, they still require a short amount of time for their associated Boolean expressions to be evaluated. Although this short amount of time may be tolerable in some cases, where the conditional breakpoint is encountered a large number of times, program timing may be so significantly affected that reproducing program errors in a debugging environment may be difficult or impossible.
A frequently occurring situation in which a conditional breakpoint may be encountered a large number of times is where the breakpoint is set within a program loop. A program loop is a repetition within a program, and may iterate a large number of times. Therefore, where a conditional breakpoint is set within a program loop, program timing is more likely to be substantially affected, and accordingly, the difficulty or impossibility of reproducing program errors in the debugging environment becomes more likely.
Therefore, there is a need for debugger impact reduction.